home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 January
/
Macworld (1997-01).dmg
/
Shareware World
/
Comms & Internet
/
Eudora Share
/
Eudora Share Install
next >
Wrap
Text File
|
1996-09-18
|
3KB
|
100 lines
script switch
on switchFile(myName, otherName)
tell application "Finder"
try
set auxFolder to folder "Eudora Share:Alt Settings" of system folder
on error
error "Please run the Installer first."
end try
try
set euFolder to folder "Eudora Folder" of system folder
on error
error "It seems Eudora is not installed in this computer."
end try
repeat with currentFile in (get files in auxFolder)
if currentFile ends with myName then
copy the name of currentFile to nameFile
copy (characters 1 thru ((the offset of myName in nameFile) - 2) of nameFile) as string to realFile
copy realFile & " " & otherName to otherFile
move file realFile of euFolder to auxFolder
set name of item realFile of auxFolder to otherFile
move currentFile to euFolder
set name of item nameFile of euFolder to realFile
end if
end repeat
end tell
end switchFile
end script
script e1
set seu to (path to system folder as string) & "Eudora Share:switch Eudora"
copy (load script file seu) to switchFiles
tell switchFiles
switchFile("1", "2")
end tell
tell application "Eudora"
run
end tell
end script
script e2
set seu to (path to system folder as string) & "Eudora Share:switch Eudora"
copy (load script file seu) to switchFiles
tell switchFiles
switchFile("2", "1")
end tell
tell application "Eudora"
run
end tell
end script
tell application "Finder"
try
set euFolder to folder "Eudora Folder" of system folder
on error
error "It seems Eudora is not installed in this computer."
end try
set alreadyinstalled to true
try
set auxFolder to folder "Eudora Share:Alt Settings" of system folder
on error
set alreadyinstalled to false
end try
end tell
if alreadyinstalled then
tell application "Finder"
display dialog "Eudora Share has already been installed on this computer." buttons {"OK"} default button "OK"
end tell
else
tell application "Finder"
make new folder at system folder with properties {name:"Eudora Share"}
set euShareFolder to folder "Eudora Share" of system folder
make new folder at euShareFolder with properties {name:"Alt Settings"}
set euFolder to folder "Eudora Folder" of system folder
set altFolder to folder "Eudora Share:Alt Settings" of system folder
try
duplicate file "In.toc" of euFolder to altFolder
duplicate file "In" of euFolder to altFolder
duplicate file "Out.toc" of euFolder to altFolder
duplicate file "Out" of euFolder to altFolder
duplicate file "Eudora Settings" of euFolder to altFolder
on error
delete altFolder
error "It seems Eudora is not properly installed in this computer. Some files are missing in the Eudora Folder."
end try
repeat with currentFile in (altFolder)
copy the name of currentFile to nameFile
copy nameFile & " 2" to newNameFile
set name of currentFile to newNameFile
end repeat
end tell
set seu to (path to system folder as string) & "Eudora Share:switch Eudora"
store script switch in file seu
set s to (path to desktop as string)
set s1 to s & "Eudora 1"
store script e1 in file s1
set s2 to s & "Eudora 2"
store script e2 in file s2
display dialog "Installation completed successfully." buttons {"OK"} default button "OK"
end if